import { Loading } from "@element-plus/icons-vue";
import { ElIcon, ElMessage } from "element-plus";

/**
 * 提示型加载中
 * @param title 提示信息
 * @returns 
 */
export function messageLoading(title: string) {
    return ElMessage({
        dangerouslyUseHTMLString: true,
        duration: 0,
        message: ()=>{
            return <div class="flex a-c j-c">
                {title} 
                <ElIcon class="is-loading" style={{ marginLeft:'6px' }}>
                    <Loading></Loading>
                </ElIcon>
            </div>
        },
    })
}